﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminPage.aspx.cs" Inherits="AdminPage"
    MasterPageFile="~/Default.master" EnableViewState="false" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dxwgv" %>

<%@ Register Assembly="DevExpress.Web.v9.2, Version=9.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallback" TagPrefix="dxcb" %>
<asp:Content ContentPlaceHolderID="head" ID="hd" runat="server" EnableViewState="false">

    <script src="AdminPage.js" type="text/javascript"></script>

    

    <script src="js/LOV.js" type="text/javascript"></script>

    <link href="AdminPage.css" rel="stylesheet" type="text/css" />
</asp:Content>
<asp:Content ContentPlaceHolderID="leftMenu" ID="leftnav" runat="server" EnableViewState="false">
    <% Response.Write(GenerateSideMenu()); %>
</asp:Content>
<asp:Content ContentPlaceHolderID="content" ID="ctnAdminPage" runat="server"
    EnableViewState="false">
    <div id="pnlTitle" runat="server"></div>
    <fieldset class="m_fs_border" id="fs_Grid">
        <legend>
            <a class="lnk" href="javascript:toggle('Grid');">
                Admin List</a>
        </legend>
        <dl class="m_fs">
            <div id="div_Grid">
                <dxwgv:ASPxGridView ID="dgMain" ClientInstanceName="dgMain_c" runat="server" 
                    AutoGenerateColumns="true" KeyFieldName="ID" 
                    oncustomcallback="dgMain_CustomCallback">
                    <Settings ShowFilterRow="true" ShowFilterRowMenu="true" />
                    <SettingsPager PageSize="10"></SettingsPager>
                    <SettingsBehavior AllowSort="true" />
                    <ClientSideEvents EndCallback="function(s, e) { dgMain_c_CallbackComplete(e); }" />
                    <Columns>
                        <dxwgv:GridViewDataTextColumn FieldName="ADMIN_NO" Caption="NIK Admin"></dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn FieldName="ADMIN_NAME" Caption="Nama"></dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn FieldName="CREATOR_NO" Caption="NIK Pembuat"></dxwgv:GridViewDataTextColumn>
                        <dxwgv:GridViewDataTextColumn FieldName="CREATOR_NAME" Caption="Nama"></dxwgv:GridViewDataTextColumn>
                    <dxwgv:GridViewDataTextColumn FieldName="ID" Name="ID" Caption="Delete" Width="50px">
                        <DataItemTemplate>
                            <a href="javascript:DeleteAdmin('<%# Eval("ID").ToString() %>');">Delete</a>
                        </DataItemTemplate>
                        <EditFormSettings Visible="False"/>
                    </dxwgv:GridViewDataTextColumn>
                    </Columns>
                </dxwgv:ASPxGridView>
                <br />
                <div style="display:inline;">
                    <dt><% Response.Write(AdminPageManager.BuildEditor_AdminList()); %></dt>
                    <dd>
                    <input type="button" id="btnAdd" class="btn" onclick="AddAdmin();" value="Add as Admin" style="width:120px;"/>
                    <input type="hidden" id="hfAdd" value="" />
                    </dd>
                </div>
            </div>
        </dl>
    </fieldset>
</asp:Content>
